package GuavaGper;



import Observable.Question;
import com.google.common.eventbus.Subscribe;

/**
 * @program: homeWork
 * @description:
 * @author: hezhiqin
 * @create: 2019-10-09 09:16
 */
public class Gper {

    private String name = "GPer 生态圈";
    private static Gper gper = null;
    private Gper(){}


    public static Gper getInstance(){
        if(null == gper){
            gper = new Gper();
        }
        return gper;
    }

    public String getName() {
        return name;
    }

    @Subscribe
    public void publishQuestion(Question question){
        System.out.println(question.getUserName() + "在" + this.name + "上提交了一个问题。");
    }
}
